home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jazlib.arc / JZSAVWND.C < prev    next >
Text File  |  1988-12-18  |  779b  |  28 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │ Title   : jzsavwnd                                 │
  4. │ Purpose : Copy a window into a buffer.                     │
  5. │                                         │
  6. │    Written by Jack Zucker - 75766,1336    301-794-5950  on 1/15/85      │
  7. └────────────────────────────────────────────────────────────────────────────┘
  8. */
  9. #include <jaz.h>
  10. #include <jzscreen.h>
  11.  
  12. jzsavwnd ( fwindow )
  13. TWINDOW *fwindow;
  14. {
  15.   int wscrseg,wdseg;
  16.  
  17.   wdseg = getds();
  18.  
  19.   if (MEMB(0x40,0x49)==3)    /* true if color screen   */
  20.     wscrseg = 0xB800;        /* color mode */
  21.   else
  22.     wscrseg = 0xB000;        /* mono  mode */
  23.  
  24.   moveb(wscrseg,fwindow->row1 * 160 + (fwindow->col1 << 1),
  25.     wdseg,fwindow->buf,fwindow->row2-fwindow->row1+1,
  26.     fwindow->col2-fwindow->col1+1);
  27. }
  28.